
class MyArray<E> {
    private Object[] array = new Object[10];
    public void setValue(int pos, E x) {
        array[pos] = x;
    }
    public E retValue(int pos) {
        return (E)array[pos];
    }
}

public class Test {
    public static void main(String[] args) {
        MyArray<Integer> arr = new MyArray<Integer>();
        arr.setValue(1,20);
        System.out.println(arr.retValue(1));
        System.out.println("==================");
        MyArray<String> arr1 = new MyArray<String>();
        arr1.setValue(0,"hello");
        System.out.println(arr1.retValue(0));
    }
}
